package com.cgy.utils.jmx.jvm.file;

import com.cgy.utils.jmx.IJvmInfoFactory;
import com.cgy.utils.jmx.jvm.constant.Jvm;
import com.cgy.utils.jmx.jvm.constant.JvmInfo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author CHTK
 */
public class FileFactory extends IJvmInfoFactory {

    @Override
    public void status() {
        Map<String, String> fields = fields();
        for (Map.Entry<String, String> stringStringEntry : fields.entrySet()) {
            put(stringStringEntry.getKey(), System.getProperty(stringStringEntry.getKey()), stringStringEntry.getValue());
        }
    }

    @Override
    public Map<String, String> fields() {
        return new HashMap<String, String>(3) {
            {
                put("file.separator", "文件分隔符");
                put("path.separator", "路径分隔符");
                put("line.separator", "行分隔符");
            }
        };
    }

}
